home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / MPW / gawk 2.11.1r3 / Sources / Makefile < prev    next >
Encoding:
Makefile  |  1991-06-08  |  5.2 KB  |  199 lines  |  [TEXT/MPS ]

  1. # Makefile for GNU Awk.
  2. #
  3. # Copyright (C) 1986, 1988, 1989 the Free Software Foundation, Inc.
  4. # This file is part of GAWK, the GNU implementation of the
  5. # AWK Progamming Language.
  6. # GAWK is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 1, or (at your option)
  9. # any later version.
  10. # GAWK is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with GAWK; see the file COPYING.  If not, write to
  16. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #
  19. # MPW Makefile 02Jun91 Matthias Ulrich Neeracher <neeri@iis.ethz.ch>
  20. #
  21.  
  22. # User tunable macros
  23.  
  24. #    To port GAWK, examine and adjust the following flags carefully.
  25. #    In addition, you will have to look at alloca below.
  26. #    The intent (eventual) is to not penalize the most-standard-conforming
  27. #    systems with a lot of #define's.
  28. #
  29. #    -DBCOPY_MISSING        - bcopy() et al. are missing; will replace
  30. #                  with a #define'd memcpy() et al. -- use at
  31. #                  your own risk (should really use a memmove())
  32. #    -DSPRINTF_INT        - sprintf() returns int (most USG systems)
  33. #    -DBLKSIZE_MISSING    - st_blksize missing from stat() structure
  34. #                  (most USG systems)
  35. #    -DBSDSTDIO        - has a BSD internally-compatible stdio
  36. #    -DDOPRNT_MISSING    - lacks doprnt() routine
  37. #    -DDUP2_MISSING        - lacks dup2() system call (S5Rn, n < 4)
  38. #    -DGCVT_MISSING        - lacks gcvt() routine
  39. #    -DGETOPT_MISSING    - lacks getopt() routine
  40. #    -DMEMCMP_MISSING    - lacks memcmp() routine
  41. #    -DMEMCPY_MISSING    - lacks memcpy() routine
  42. #    -DMEMSET_MISSING    - lacks memset() routine
  43. #    -DRANDOM_MISSING    - lacks random() routine
  44. #    -DSTRCASE_MISSING    - lacks strcasecmp() routine
  45. #    -DSTRCHR_MISSING    - lacks strchr() and strrchr() routines
  46. #    -DSTRERROR_MISSING    - lacks (ANSI C) strerror() routine
  47. #    -DSTRTOD_MISSING    - lacks strtod() routine
  48. #    -DTMPNAM_MISSING    - lacks or deficient tmpnam() routine
  49. #    -DVPRINTF_MISSING    - lacks vprintf and associated routines
  50.  
  51. MISSING =    -d BCOPY_MISSING         ∂
  52.                 -d SPRINTF_INT         ∂
  53.                 -d BLKSIZE_MISSING     ∂
  54.                 -d DOPRNT_MISSING     ∂
  55.                 -d DUP2_MISSING        ∂
  56.                 -d GCVT_MISSING         ∂
  57.                 -d GETOPT_MISSING     ∂
  58.                 -d RANDOM_MISSING     ∂
  59.                 -d STRCASE_MISSING
  60.  
  61. # Comment out the next line if you don't have gcc.
  62. # Also choose just one of -g and -O.
  63. #C            =    gC
  64.  
  65. C            =    C
  66.  
  67. DEBUG        =    #-sym on -mbg on
  68. LDEBUG    =    #-sym 'On '
  69. OPTIMIZE    =    #-opt full                                                    # for gcc only
  70. WARN        =    #-W -Wunused -Wimplicit -Wreturn-type -Wcomment    # for gcc only
  71.  
  72. # Install installs the tools here
  73.  
  74. ToolDir    =    "{MPW}Tools:"
  75.  
  76. # Parser to use on grammar -- if you don't have bison use the first one
  77. #PARSER     =    yacc
  78. PARSER     =    bison
  79.  
  80. # ALLOCA
  81. #    Set equal to alloca.o if your system is S5 and you don't have
  82. #    alloca. Uncomment one of the rules below to make alloca.o from
  83. #    either alloca.s or alloca.c.
  84. ALLOCA    =    alloca.c.o
  85.  
  86. #
  87. # With the exception of the alloca rule referred to above, you shouldn't
  88. # need to customize this file below this point.
  89. #
  90.  
  91. FLAGS        =    {MISSING} {DEBUG}
  92. COptions    =    {FLAGS} {OPTIMIZE} {WARN} -s awk
  93.  
  94. # object files
  95. AWKOBJS    =    main.c.o            ∂
  96.                 eval.c.o         ∂
  97.                 builtin.c.o     ∂
  98.                 msg.c.o             ∂
  99.                 debug.c.o         ∂
  100.                 io.c.o             ∂
  101.                 field.c.o         ∂
  102.                 array.c.o         ∂
  103.                 node.c.o            ∂
  104.                 version.c.o        ∂
  105.                 missing.c.o
  106.  
  107. ALLOBJS    =    {AWKOBJS} awk.tab.c.o
  108.  
  109. #    Has to be subdivided for segmentation
  110.  
  111. AWKOBJS1    =    main.c.o            ∂
  112.                 eval.c.o         ∂
  113.                 builtin.c.o     ∂
  114.                 msg.c.o             ∂
  115.                 debug.c.o
  116.  
  117. AWKOBJS2    =    io.c.o             ∂
  118.                 field.c.o         ∂
  119.                 array.c.o         ∂
  120.                 node.c.o            ∂
  121.                 version.c.o        ∂
  122.                 missing.c.o
  123.  
  124. # GNUOBJS
  125. #    GNU stuff that gawk uses as library routines.
  126. GNUOBJS    =    regex.c.o {ALLOCA}
  127.  
  128. # source and documentation files
  129. SRC        =    main.c            ∂
  130.                 eval.c            ∂
  131.                 builtin.c        ∂
  132.                 msg.c                ∂
  133.                 debug.c            ∂
  134.                 io.c                ∂
  135.                 field.c            ∂
  136.                 array.c            ∂
  137.                 node.c            ∂
  138.                 missing.c
  139.  
  140. ALLSRC    =    {SRC} awk.tab.c
  141.  
  142. AWKSRC    =    awk.h awk.y {ALLSRC} patchlevel.h gawk.r
  143.  
  144. GNUSRC    =    alloca.c regex.c regex.h
  145.  
  146. DOCS        =    gawk.help gawk.txt
  147.  
  148. MISC         =    CHANGES COPYING FUTURES Makefile PROBLEMS README README.MPW
  149.  
  150. ALLFILES    =    {AWKSRC} {GNUSRC} {MISC} {DOCS}
  151.  
  152. # Release of gawk.  There can be no leading or trailing white space here!
  153. REL=2.11.1r3
  154.  
  155. # rules to build gawk
  156.  
  157. awk1.o    ƒ    {AWKOBJS1}
  158.     Lib -o awk1.o -sym 'On ' -sg awk1=awk {AWKOBJS1} 
  159.  
  160. awk2.o    ƒ    {AWKOBJS2}
  161.     Lib -o awk2.o -sym 'On ' -sg awk2=awk {AWKOBJS2} 
  162.  
  163. Gawk        ƒƒ awk1.o awk2.o awk.tab.c.o {GNUOBJS}
  164.     Link -t MPST -c 'MPS ' -w -o Gawk {LDEBUG}         ∂
  165.         awk1.o awk2.o awk.tab.c.o {GNUOBJS} ∂
  166.         {CLibraries}CRuntime.o                     ∂
  167.         {CLibraries}CInterface.o                 ∂
  168.         {CLibraries}StdCLib.o                     ∂
  169.         {Libraries}Runtime.o                     ∂
  170.         {Libraries}Interface.o                     ∂
  171.         {Libraries}ToolLibs.o                    ∂
  172.         {CLibraries}Math.o                         ∂
  173.         {CLibraries}CSANELib.o
  174.  
  175. Gawk        ƒƒ    gawk.r
  176.     Rez -o Gawk -t MPST -c 'MPS ' -a gawk.r
  177.     
  178. Install    ƒ    Gawk
  179.     Move Gawk {ToolDir}
  180.  
  181. {AWKOBJS}ƒ awk.h
  182.  
  183. main.c.o    ƒ patchlevel.h
  184.  
  185. awk.tab.c.oƒ awk.h awk.tab.c
  186.     {C} awk.tab.c -o awk.tab.c.o {FLAGS} {OPTIMIZE} {WARN} -s awk3
  187.     
  188. awk.tab.cƒ awk.y
  189.     {PARSER} -v awk.y
  190.  
  191. # auxiliary rules for release maintenance
  192.  
  193. cleanƒ
  194.     delete -y -i gawk ≈.o awk.output gawk.sym ≈.makeout
  195.